// Decompiled on 周六 2月 22 19:31:49 CST 2025 with Zomboid Decompiler v0.1.3 using Vineflower.
package zombie.randomizedWorld.randomizedDeadSurvivor;

import java.util.ArrayList;
import zombie.core.Rand;
import zombie.iso.BuildingDef;
import zombie.iso.IsoGridSquare;
import zombie.iso.RoomDef;

public final class RDSBedroomZed extends RandomizedDeadSurvivorBase {
    private final ArrayList<String> pantsMaleItems = new ArrayList();
    private final ArrayList<String> pantsFemaleItems = new ArrayList();
    private final ArrayList<String> topItems = new ArrayList();
    private final ArrayList<String> shoesItems = new ArrayList();

    public RDSBedroomZed() {
        this.name = "Bedroom Zed";
        this.setChance(7);
        this.shoesItems.add("Base.Shoes_Random");
        this.shoesItems.add("Base.Shoes_TrainerTINT");
        this.pantsMaleItems.add("Base.TrousersMesh_DenimLight");
        this.pantsMaleItems.add("Base.Trousers_DefaultTEXTURE_TINT");
        this.pantsMaleItems.add("Base.Trousers_Denim");
        this.pantsFemaleItems.add("Base.Skirt_Knees");
        this.pantsFemaleItems.add("Base.Skirt_Long");
        this.pantsFemaleItems.add("Base.Skirt_Short");
        this.pantsFemaleItems.add("Base.Skirt_Normal");
        this.topItems.add("Base.Shirt_FormalWhite");
        this.topItems.add("Base.Shirt_FormalWhite_ShortSleeve");
        this.topItems.add("Base.Tshirt_DefaultTEXTURE_TINT");
        this.topItems.add("Base.Tshirt_PoloTINT");
        this.topItems.add("Base.Tshirt_WhiteLongSleeveTINT");
        this.topItems.add("Base.Tshirt_WhiteTINT");
    }

    @Override
    public void randomizeDeadSurvivor(BuildingDef def) {
        RoomDef roomDef = this.getRoom(def, "bedroom");
        boolean boolean0 = Rand.Next(7) == 0;
        boolean boolean1 = Rand.Next(7) == 0;
        if (boolean0) {
            this.addZombies(def, 2, "Naked", Integer.valueOf(0), roomDef);
            this.addItemsOnGround(roomDef, true);
            this.addItemsOnGround(roomDef, true);
        } else if (boolean1) {
            this.addZombies(def, 2, "Naked", Integer.valueOf(100), roomDef);
            this.addItemsOnGround(roomDef, false);
            this.addItemsOnGround(roomDef, false);
        } else {
            this.addZombies(def, 1, "Naked", Integer.valueOf(0), roomDef);
            this.addItemsOnGround(roomDef, true);
            this.addZombies(def, 1, "Naked", Integer.valueOf(100), roomDef);
            this.addItemsOnGround(roomDef, false);
        }
    }

    private void addItemsOnGround(RoomDef roomDef, boolean _boolean) {
        IsoGridSquare isoGridSquare = getRandomSpawnSquare(roomDef);
        this.addRandomItemOnGround(isoGridSquare, this.shoesItems);
        this.addRandomItemOnGround(isoGridSquare, this.topItems);
        this.addRandomItemOnGround(isoGridSquare, _boolean ? this.pantsMaleItems : this.pantsFemaleItems);
    }
}
